<#include "/common/_layout.html"/>
<#include "/common/_search_form.html"/>
<@layout>
<h1>常量管理&nbsp;&nbsp;
<a href="${BASE_PATH!}/code_manager/add">创建常量</a>
</h1>
<@search_form actionUrl="${BASE_PATH!}/code_manager/page">
命名空间：
<select name="namespace" id="namespace">
</select>
父级：
<select name="father_id" id="father_id">
</select>
<script type="text/javascript">
$(document).ready(function(){
	var initSel_namespace = function(callback){
		SelectTool.initSelectData({
			elId:"namespace",
			url:"${BASE_PATH!}/code_manager/listByNamespace",
			postData:{"namespace":"Namespace"},
			valueName:"code",
			textName:"name",
			defaultValue:"${(namespace)!}",
			haveAll:true,
			callback:callback
		});
	}
	var initSel_father_id = function(callback){
		SelectTool.initSelectData({
			elId:"father_id",
			url:"${BASE_PATH!}/code_manager/listByNamespace",
			postData:{"namespace":"None"},
			valueName:"id",
			textName:"name",
			defaultValue:"${(father_id)!}",
			haveAll:true,
			callback:callback
		});
	}
	//初始化
	initSel_namespace(function(){
		initSel_father_id(function(){
			initSearch(1);
		});
	});
	
});
</script>
</@search_form>
</@layout>